package com.software.entity;

import com.alibaba.fastjson.JSON;

import java.util.Date;
import java.util.UUID;

/**
 * 甲烷传感器
 */
public class MethaneGasSensor extends GasSensor {

    /**
     * 着火点
     */
    private String ignition;

    public String getIgnition() {
        return ignition;
    }

    public void setIgnition(String ignition) {
        this.ignition = ignition;
    }

    /**
     * 燃烧
     */
    public void combustion() {}


    /**
     * 显示传感器信息
     *
     * @return
     */
    public String showInfo() {
        MethaneGasSensor methaneSensor = new MethaneGasSensor();
        methaneSensor.setCreateTime(new Date());
        methaneSensor.setModelName("甲烷传感器");
        methaneSensor.setLocation("油印室");
        methaneSensor.setThreshold("0.02%");
        methaneSensor.setId(UUID.randomUUID().toString().replace("-", ""));
        return JSON.toJSONString(methaneSensor);
    }
}
